package com.baidu.common;

import java.util.HashMap;

public class R extends HashMap {
    public static R ok(){
        R r = new R();
        r.put("code",200);
        r.put("message","调用成功");
        return r;
    }


    public static R error(String msg){
        R r = new R();
        r.put("code",500);
        r.put("message",msg);
        return r;
    }

    public static R error(){
        return error("服务器出现异常");
    }
}
